package com.controller.seedoctor;

import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigInteger;
import java.sql.Timestamp;

@RestController
@RequestMapping("/seeDoctor")
@Api(value = "看病就诊模块",tags = "患者库接口")
@ApiResponses({
        @ApiResponse(code = 200, message = "请求成功"),
        @ApiResponse(code = 404, message = "找不到页面"),
        @ApiResponse(code = 405, message = "请求方法错误"),
        @ApiResponse(code = 500, message = "后台服务错误"),
})
public class BankController {
    //查询患者库信息

        @GetMapping("/bank/queryBank")
        @ApiOperation(value = "查询患者付款状态", notes = "查询患者付款状态")
        @ApiImplicitParams({
                @ApiImplicitParam(name = "CurrentPage", value = "当前页码数", paramType = "query", dataType = "Integer", required = true),
                @ApiImplicitParam(name = "PageSize", value = "每行显示记录数", paramType = "query", dataType = "Integer", required = true),
                @ApiImplicitParam(name = "bank_name", value = "患者姓名", paramType = "query", dataType = "String", required = true),
                @ApiImplicitParam(name = "phone", value = "手机号", paramType = "query", dataType = "String", required = true)
        })
        public String querystatus(@ApiParam() Integer CurrentPage, Integer PageSize, String bank_name, String phone) {

            return "{\n" +
                    "\t\"code\": 200,\n" +
                    "\t\"msg\": \"成功！\",\n" +
                    "\t\"data\": []\n" +
                    "}" +
                    "{\n" +
                    "\t\"code\": 500,\n" +
                    "\t\"msg\": \"服务器开小差！\",\n" +
                    "\t\"data\": []\n" +
                    "}";

        }

        //患者库,移除按钮

            @PostMapping("/bank/deleteBank")
            @ApiOperation(value = "删除患者库信息", notes = "删除患者库信息")
            @ApiImplicitParams({
                    @ApiImplicitParam(name = "bank_id", value = "患者姓名", paramType = "query", dataType = "bigint", required = true),
            })
            public String deleteBank(@ApiParam() BigInteger bank_id) {

                return "{\n" +
                        "\t\"code\": 200,\n" +
                        "\t\"msg\": \"成功！\",\n" +
                        "\t\"data\": []\n" +
                        "}" +
                        "{\n" +
                        "\t\"code\": 500,\n" +
                        "\t\"msg\": \"服务器开小差！\",\n" +
                        "\t\"data\": []\n" +
                        "}";

            }


        //修改患者库信息3

            @PostMapping("/bank/updateBank")
            @ApiOperation(value = "修改患者付款状态", notes = "修改患者付款状态")
            @ApiImplicitParams({
                    @ApiImplicitParam(name = "bank_name", value = "患者姓名", paramType = "query", dataType = "String", required = true),
                    @ApiImplicitParam(name = "sex", value = "性别", paramType = "query", dataType = "String", required = true),
                    @ApiImplicitParam(name = "birthday", value = "生日", paramType = "query", dataType = "String", required = true),
                    @ApiImplicitParam(name = "height", value = "身高", paramType = "query", dataType = "Integer", required = true),
                    @ApiImplicitParam(name = "weight", value = "体重", paramType = "query", dataType = "Integer", required = true),
                    @ApiImplicitParam(name = "blood", value = "血型", paramType = "query", dataType = "String", required = true),
                    @ApiImplicitParam(name = "blood_type", value = "血型类型", paramType = "query", dataType = "String", required = true),
                    @ApiImplicitParam(name = "left_ear", value = "左耳听力", paramType = "query", dataType = "Double", required = true),
                    @ApiImplicitParam(name = "right_ear", value = "右耳听力", paramType = "query", dataType = "Double", required = true),
                    @ApiImplicitParam(name = "id_number", value = "血型", paramType = "query", dataType = "String", required = true),
                    @ApiImplicitParam(name = "right_vision", value = "血型", paramType = "query", dataType = "String", required = true),
                    @ApiImplicitParam(name = "contact", value = "血型", paramType = "query", dataType = "String", required = true),
                    @ApiImplicitParam(name = "bear", value = "关系", paramType = "query", dataType = "String", required = true),
                    @ApiImplicitParam(name = "phone", value = "紧急联系人电话", paramType = "query", dataType = "String", required = true),
                    @ApiImplicitParam(name = "allergic_history", value = "过敏史", paramType = "query", dataType = "String", required = true)
            })
            public String updateBank(@ApiParam() String bank_name, String sex, String birthday, Integer height, Integer weight, String blood, String blood_type, Double left_ear, Double right_ear, String id_number, String right_vision, String contact, String bear, String phone, String allergic_history) {

                return "{\n" +
                        "\t\"code\": 200,\n" +
                        "\t\"msg\": \"成功！\",\n" +
                        "\t\"data\": []\n" +
                        "}" +
                        "{\n" +
                        "\t\"code\": 500,\n" +
                        "\t\"msg\": \"服务器开小差！\",\n" +
                        "\t\"data\": []\n" +
                        "}";

            }
        //导出患者库信息4

            @GetMapping("/bank/induceBank")
            @ApiOperation(value = "导出患者库信息", notes = "导出患者库信息")
            @ApiImplicitParams({
                    @ApiImplicitParam(name = "bank_id", value = "序号", paramType = "query", dataType = "Integer", required = true),
                    @ApiImplicitParam(name = "update_time", value = "更新日期", paramType = "query", dataType = "datetime", required = true),
                    @ApiImplicitParam(name = "bank_name", value = "患者姓名", paramType = "query", dataType = "String", required = true),
                    @ApiImplicitParam(name = "sex", value = "手机号", paramType = "query", dataType = "String", required = true),
                    @ApiImplicitParam(name = "age", value = "手机号", paramType = "query", dataType = "Integer", required = true),
                    @ApiImplicitParam(name = "phone", value = "手机号", paramType = "query", dataType = "String", required = true)
            })
            public String induceBank(@ApiParam() Integer bank_id, Timestamp update_time, String bank_name, String sex, Integer age, String phone) {
                return "{\n" +
                        "\t\"code\": 200,\n" +
                        "\t\"msg\": \"成功！\",\n" +
                        "\t\"data\": []\n" +
                        "}" +
                        "{\n" +
                        "\t\"code\": 500,\n" +
                        "\t\"msg\": \"服务器开小差！\",\n" +
                        "\t\"data\": []\n" +
                        "}";

            }
        }


